The algebra is slightly more complex and programmers may wish to consider consolidating the line generation into a new function for ease of reading.