before script extended