add algo that handles node that has been went pass
update algo for node that has been gone pass 2