Tested for edge cases in changing end number of number line