First version of thread id parsing