prepare index