stop at horizontal partitioning and vertical partitioning