add solution to homework 3.1