improved string compare