- added getitem function