add docstring to server.py too
add first go at serialisation routines