Finished ex5 and first part of ex6