public function remove(string $key)
    {
        if ($this->contains($key)) {
            $res = $_SESSION[$key];
            unset($_SESSION[$key]);
            return $res;
        } else {
            return null;
        }
    }