change if-else block in comparator