fix typo
make shift operations more flexible
more tests of array indexing and memory reads