initial generate_class_methods function