calculate all the changed lines