refactoring with hassan