moving to use RestTemplate from the Spring framework