any reason to simply remove the `newDetails` variable and hand it directly to the hash?