Add index functions.