added finished flag