course proglang: modify code for homework 1