made all functions RESTful