fix smooth_mesh() - improve efficiency