HW2 problems 2.4, 2.5, and 2.7

set up for first 3 problems of HW2