implemented RESTful API