Implementation for actually handling and sending the response