better intersection test