adding attahachments loop