index and conversion function