add navbar  and adjust tab state