can actually send and receive messages now; added a bit of error checking.