removed redundant boolean flag