almost done on assignment 6 Q12