add laplacian smoothing as well as handle empty category