New function to create random string