changing keyup to keydown