homework 3, partially done