further split into random.c