changed db object to pdo object