recipe.index logic