redid implementation of index buttons and test with 'real' data