rewrote the test sot hat it wasn't dependent on random stuff

fixed the test so that it wouldn't randomly fail