start of refactoring
refactor done