script to compare arrays