adding parsing loop