using min() to determine the lowest ip count instead of a lame 99999 hack yuck