session refact