make RESTful handler work