add transaction macro