rewrote rankall.R ... WIP