improved REST API and added DELETE method