created index function for recipes controller