rename pos to index_to_pos