Implemented init_flag