public int PrevValue(int current, string tag) { return new Random().Next(0, Math.Min(1000, Math.Max(0, current))); }