resolving homework 3.2