updated with revisions, transaction and db handlers