Added ex3 example code