completed rankall.R, submitted correctly