refactor uuid generation