now start refactoring