added random function for TrueValue