data reader and random number finding