Index strings in proper order