private function closeCursor()
    {
        try {
            if ($this->stmt) {
                $this->stmt->closeCursor();
            }
        } catch (\PDOException $e) {
            die("Error: " . $e->getMessage());
        }
    }