code review: improves code styling, changes nextnode to next