incremental; more work on emitting commands