stuff for comms with the server