added dictionary building for cpp