updated before script