add sorting to directory