Thread detection

{currently in progress}