Made the index action work