Added sorting counterpart to searching.