Adding code to handle response
updating methods