edit peer.py and event.py