Adding code to produce dep tree