initial server code