Replacing further rand() calls
Code maintenance