added key events for up and down