extend peer_t struct, rework main