proper traversl of list from dom module.