doublylinked list using stack
multipurpose tree iterator