restructuring merge class