compare strings with correct equal method