adding second loop