pass the transaction into the create calls, fix up error handling