adding transactional stuff, but not quite there.