For #5, adding template for thread() reference