making rest client instance global