Added sorting by departments