Add chunking of input to jscript