made api more RESTful