Ex3.5 almost done

requires more testing and polishing