Added ability to preset number of slices.