updated fa caret and flag code