added flag filter