split in the vertical and horizontal directions