retrieve common elements from two arrays