made some change using do loop