Created a function for sending user a response