Finish step counter algorithm implementation