made example compatible with multi-file attachment