trying to make min\max expression