added rest server implementation