solves #5, improved code
navigation template