Made alterations so code uses secondaryType