adds basic thread stuff