code revise removing useless flag