implemented flag change