refactoring with new directories