moving navigation functions to nav.rs