rewrote rank sorting for typo_stop