adds navigation bar functionality