added a more efficient way to handle the nav activation