updates to instance.cpp
instace.cpp update