Doing, understanding, and learning in problem solving