Updating JS fn.