add type and broadcasting