First pass at the add_ip function