improve session class