added support for scripted input