modified loop content and added moer description at start comment