Added sorting to the list