Added support for attachments