added some c trickery
now an explicit finishCommnands must be run