Adding solutions for homework 5