add ex1 code