adding dowhile
fix