optimize intersectp