added thread template
Merge branch 'thread'