added some functionality for the extraction (and fixing) of dependency