Added name variable declaration, and updated reference to answer.next.