ok now the api random function works.