added changed some server code