for cs331 activity1-2