transform: allows for non-scalar output types