adding splitting edge logic