improve the api to accept PATCH requests.