removed array cast, added not equals test