added intersection array function