merging the button navigation class along with menu navigation functionality