adding rank to details output