having trouble with random, unrealiable at the moment