Pain, the self and persistence in problem solving