index with buffer