added assertions to check size of starting point, upper, and lower.