working unique id and storing