refactoring and ooping