Write another version of strategy pattern