added format specification and added some server code