edits to uniques answer
added tests