homework 2 attempt #1