working on some flag bugs, and some output updates