mixed up min/max