finished rankall.R program