adding frandom.c (thanks to hadidjapri)