Changed function to array_intersect to match two arrays