refactoring everyting