better unique

should probably just use a library that has a unique function i can rely on, but here is the one that is working for me so far.