changed view to use a recursive function for displaying nav.