Solutions for homework 2 up