final fix on do/end in while loops. FINISHED.