Added script functionality