more coding for rankall.r
final rankall.r