Add public function to extract data form existing pdo