new commit, flags almost fixed