added modified random.c