Added code for noise generation.
Fixed 0 for random number noise generator issue.