starting deep refactoring