distance\index file generator