randomString update to support dictonary.