starting on refactoring