homework 2 with samples