make MapDependencyGraph into a record for easier printing and general use