fix api to RESTful(?)