added functionality to nav bar