rest function, implement put and delete

- [x] add PUT
- [x] add DELETE