add payload and attachment constructors