added a variable for how many keys to use