revision to problem 1