Added random generator and some methods

Signed-off-by: stroju <stroju@gmail.com>