improvements on rest client