final fixes for ex8, ex9