modify to use navigation stack