fixed bug in strategy pattern