add method to increment current line index.