Restoring commented-out randomising function (client request)