Program for problem set 1