added new_from_type convenience function