Changed line 52 line.length to lineData.length