added array_compare method