using modified flag