Pushing saving the rightKey outside the loop. Removing code that didn't do anything