define type using class_name etc. instead of define_type etc.