ex6 complete, ugly.