refacotring colocationgraph