cleaning up client/server exchange