Bug-fix for master
resolve merge conflict
additional codes in r2_index done