remove double assignment and addition to  0