add FlagEn signal
fix initial data given by prof