pre loop flag
flag support added