Final version homework 3