slight refactoring of navigation system