Writing the response