directory refactor 2