added "problem 2" from h/w 2