improve rest api