add __getitem__ method for entry