moved nav script to separate file