wrote solutions for chapters 3 and 4