circular references are put in the individual buckets, however directed
paths are not, how to solve this?
now creating the graph with O(n+m)