change itersection to numpy function. add extra test for main fun