lets conserve emscriptem memory where possible, we have to manage manually