added uid gen code