Almost working maxInRange method.