Added sorting to items