added an hasFinished flag