Updated nave javascript