[PD-dev] using rand() in an external