handles multiple transactions