adds index and new dynamic generation