found recursive solution to list problem.