completed demo 3 ex2