added a next() function for iterating through the last node on the stack (only one iteration at a time)