finished the first homework exercise