resolving homework 3.3