modified flag lR functionality