adding scripting support (incomplete)