mahoosive refactoring