commented on problem 18 code