refactoring pack / unpack language, doesn't build