add support for setting default_type