reintroduce emit-var to avoid manually emitting