update indexing and add default id