handle attachments better