limit the maximum values to short (~32,000) as large values use a lot of memory