add sorting to lists