Adding dataset generation from clusters

why not declaring the var here instead of above?