session class rewrite