better uuid logic