some modification to part 2 of Problem 5