implementing rest client