generate dependancy graph