refactored to strategy