up and down arrow keys implemented, only fails when reaching the bottom