remove duplication at making depends on tree
remove goto
do not print self depends and reverse printing