created preventDuplicateNames function, prevents dup names...