updated distributed transformer to handle struct return types