first draft of rankall.R

Started developing new (and last function)