improved __getitem__.
__getitem__ test