refactoring SessionUtils