Implementation of a simplistic random number generator