writing random-start and random-finished flags