RNG initial commit
added flatMap method