Try to implement waitForFinished
remove printf
pthread is cool