added the strategy pattern