modified exercise3 homework1