Implementing the calc of lines changed