Initialize random number earlier