completed arrow navigation functionality