refactoring on sessionData