moved index buffering outsite of get()