Assignment 8 SOlution