add changing of flags realtime