refactor sessions table