I think we should refactor this to return the `$type`s in an array rather than 3 arrays