binding to script event