begin implementation of flag support