improved lookup_peer