improve random test