improvements on do-statements