make random functions throught unittest