add scripts to generate pack and unpack functions