added code for problem 33