Changed words replace from while to for