start implementing transaction infrastructure

mostly without test functions