added __repr__ for decoder and encoder