new style version for Homework 4 part 1