added code to split plans at finer granularity