working unique, now just need it in a fuction