some progress on indexselect. todo: memcpy things