`var linePos` is no longer used. You probably want to change this to `var linePosition`. Also, move all the `var linePosition`, `var lineVelocity` and `var line`declaration to this line at the top of the function declaration please.