add a line to index