make two nested try/tach instead if instanceof and init mapingsToUpdate