debug functions and navigation template