add a get_by_ip() method