added StrategyPattern