change type conversion to instanceClass