new way of calculating intersections

thanks to @typemytype