sorting out directory structure