add counter condition copy function