improve rest API