refactored nav to php format