code pointing to the 3 outcomes.  Need to fix rank logic