before script update