added ex2; fixed ex1