figuring out how threads work