adding flex_counter