update modify_instance_attribute to modern API