What was he thinking? Study turns to ape intellect