move index action to separate file