write working dependency tree script
write the workng method