public function filterByDepartment($department)
    {
        $result = $this->filter(
            function ($key, $value) use ($department) {
                if ($value->getDepartment() == $department) {
                    return true;
                }
            }
        );

        if ($result && 1 === count($result)) {
            $results = $result->toArray();

            return array_shift($results);
        }

        return $result;
    }