initFlag added