Working on the unpacking algo