added more advanced splitting and started with intersections