almost finished cs360 assignment