added the code to return the answer to the console