changed to gen random number each time