working on sandbox-compatible generate