use peer lastconnected
handle case of unknown number of invites better