prepared flag coding