pass in type to from_named