added rankall although it has a bug when num=worst