some changes in tryrandom.c file