Changed do loop