switched to Map instead of List for Dependency representation