adding line to index