A big mess in retrieving ip addresses