fixed it to sort ip addresses and get lowest first
added