My solutions for Homework 2.