Changed existing code to match the changes regarding response