Wrote homework 4.