send_transaction refactor