Cognitive processes underlying problem solving abilities in dogs and wolves