changed $dbh and $mysqli to private