better guid function.