Implement history rank calculations