This could be moved outside of the loop and set to zero for each iteration?