basic refactoring