second attempt at First Draft of Homework Assignment 3