updated; use crypto.randomBytes for id