updated code to use updated InstanceModelUtil methods.