moved check equality