added initSession method for easier refactoring by guitoun3