modify private int flagStop to public