finished up code for cs520 lab6