changed keypress into keydown