Added original ex3 code
Finished implementing ex3 code and Added ex4 original code