reduces number of ranges in memory by 50%

v1.1, reference: adda756f9fe7f868cf6b0b106d0ce731b5e015a6