Prepare index