renamed whenDone -> onComplete
renamed each <-> onEach
updated to lastest api.