cleaned up tabs and reordered flag