add uniqvals function