fixes for homework 3.2