added better way to display the title view in the navigation bar