First attempt at HW3 Part 2