[do-while] coding improvements