moved creating transaction into transaction controller