detect intersection