possible solution for problem 165a