correct gem structure; support attachments