move sessionGeneration in helper-Class