change RPC to RESTful