refactor navigation state assignment