strategy pattern implementation