add in histogram function to get unique value counts