FIXED OVERLAP TEST (see description)

it wasn't the inequalities, it was the outer for loop. switched to a
foreach loop and now it works fine. Added additional test for partial
overlap.