more versatile transaction handling