modify database and transaction functions