updates ex2 and 3