adding index to fields