add counter to hairpin