change array equality check to =~