fixed another gg
fixed bug in logic avoiding duplicates