added solutions for hw2 problems 2a and 2b