Ex1 solution