add check for if CPP instance was set