1.03c version rprog-assignment2 from sjchan-ds