after merging everything with horizontal and vertical partition