Adding solutions for homework4