reformat code
connection.autocommit set to false; using explicit transactions even when reading from the database