added local var declaration and a new key binding