use dynamic thread numbering