added intersects function