modify setRequestflag method