modified method ,and delete a flag