refactoring the files