wrote basic thread template for tasks