pdevs: add random functions