random_debug_fun and random_test_fun added