added __repr__ and __len__