add tests, and __getitem__