random number generator implemented for using seed numbers