refactor GUID generation