refactor session tracker