try to guess class name in pfunc()