change flag method