add create_transaction function