Still working through some errors but fixed dag revisiting nodes