- random number generation refactoring
- fixed mantis #1743