improve rest client