ex4 final fixed