implemented the navigation feature