make flags extensible

Refactor flags filter so that they are implemented in a behavior event,
possible extended elswere