Added sorting functionality.