implement send script function asynchron