parse message from peer correctly