Rework for session variable