checking in strategy pattern