more work on $dbh for read/write separation