Added thecore_random function