initial structure, testing flag correctness