generate unique id num for names