changed random variables to get it to work