refactoring all over