change db connection to PDO