finished Programming Assignment 2