modify to rewrite sandbox