rankall.R complete and correct.