Added sorting capabilities