fixed client output, added simpler serialization on server's side