refactor the navigation into a composite view