optimation on xAttachment template.