added func to attachments