Programming Assignment 2 - 2nd Attempt