set document class in method