use self-referencing instead of seperate thread table