Use do instead of while and do not mutate Node object