extract route key translation to a method and reuse it