fixes in index notation, first bunch of tests