code for extracting the dependencies and its parts