Pulling out response handling into separate method
Updating the variable names