Correct threads homework. Finally