Prework for selecting keys