Re factoring in edges and out edges divide