refactored request handling for peers using PeerRequest instead of string