updated for multi-type deployment.