May have to change things at line 56 of rankall.R. But saving this in case I need to revert.