added arrow key switching of buffers