adding RESTFull server code