make ex2 more ex3 friendly
 make ex3 idempotent