fixed a lot of problems added session class