changed the intersection calculation. should work in theory