added REST API server and client side