cleaned up longest decreasing