Adding transaction handling