updated database to PDO