added sorting to list