First attempt at Assignment 2