added functions to send peerwire messages