move index to own file