random integer generator code checked.