adding rank generation