add navbar
remove navbar when desnecessary