changed random number generation funtions to use numpy (1)
changed random number generation funtions to use numpy (2)