State changes accordingly when user selects program in sidebar