working unique elems rb soln