added counter to pairs