added uid generation