First part of homework 2