more refactoring. wow.