refactoring files/broken atm