reimplemented redflag dsl