Added __getitem__ method.