added switch for navigation buttons