changed use of mysqli to PDO