bug fix version 1.1
resolve merge conflict
added code, complete r2_index