Created shift register for slope calculation