integrating fitting algorithm into number line