removed dependencygraph parameter and renamed toDirectedGraph method
removed unused imports