ugly comparator probly works