manage navbar code