changing random number to be compatible everywhere