use build-in compare methods instead of string compare