changed nav function