adds real waitForFinish method, pause and resume