Server code

Did I do this right?