changed method to calculate array intersections