use custom condition instead of isFinished