code for navigation view