improved tesselation code and added first slice + num slices