refactoring files beginning