added scripting functions