add flag counter and border