exits from loop if self.isFinished