explicit min manipulation distance
moved magic number to constant RANGE_COUNT
geometry and magic numbers