working version of quiz 9