Add functionality to methods involving the rand() function.