work on thread removal
tmp work on thread removal [to be squashed]