refactor with (un)packint