initiated rankall.R function