implement rest client