add utility functions for rand package.
Apply Licenses