move setting the nav button states into a method