refactor enable session