searching for min/max is working