core: implement createSandbox