refactor number generator code to be able to get out the seed value