try minimum instead of maximum