added explanation to flag method