add index to data class