mergeMappedStates function

Merge two or more mapped states into one state