add size encoding
fix typo