improve rest-api