the boolean is redundant if you also have a clearmodifiers variable.  Just test clearModifiers.