fixed tests
Refactor to Strategy Pattern