Adding flag capture feature