refactoring into subdirectories