adding rank comparison