okay, refactored