same a above for the loop