correctly integrate edge intersection algorithm

1 job for dev in 3 minutes and 5 seconds (queued for 10 seconds)