use length of param with random