WIP: rm dup func

Change-Id: I921738e928179b7f0355a1e07e74f846f2718427
WIP: add opt stop condition to ex1

Change-Id: Icd96a98b062f38a966f356c59041db1da8967d2c