first wawe of refactoring
refactoring complete