finished ui update
fixed random number generation