Critical thinking as problem solving