the server code just for fun